

********************************************************************************************************
*THIS DO-FILE REPLICATES TABLES 3 IN:                                                  			   
* PATRICIA FUNK: 							                       	
* "HOW ACCURATE ARE SURVEYED PREFERENCES FOR PUBLIC POLICIES? EVIDENCE FROM
* A UNIQUE INSTITUTIONAL SETUP"                                                                                         
********************************************************************************************************


global data ="[your path]"
global results ="[your path]"

clear all
set more off
set matsize 2000


use "$data\VOX_prepared", clear 

preserve

#delimit;
keep survey_bias   Pro_Integration  Pro_Immigration Contra_Immigration Contra_Military   
Pro_Environment Contra_Nuclear  Budget_Balance  Direct_Democracy  Pro_Health_Liberal Contra_Health_Liberal  Pro_Redistribution Pro_Retirement_Age  Contra_Retirement_Age Pro_Gender Pro_Liberal policyarea datum_id yes_official survey_bias_weighted  survey_bias_weighted_left votenr; 

duplicates drop votenr, force;


reg  survey_bias   Pro_Integration  Pro_Immigration Contra_Immigration Contra_Military   
Pro_Environment Contra_Nuclear  Budget_Balance  Direct_Democracy  Pro_Health_Liberal Contra_Health_Liberal  Pro_Redistribution Pro_Retirement_Age  Contra_Retirement_Age Pro_Gender Pro_Liberal  
  if policyarea==1, noconstant  cluster(datum_id)
;

outreg2 using "$results\tab3.xls", se; 


test Pro_Integration=Pro_Immigration=Contra_Immigration=Contra_Military =Pro_Environment=Contra_Nuclear=Budget_Balance=Direct_Democracy=Pro_Health_Liberal=Contra_Health_Liberal=Pro_Redistribution=Pro_Retirement_Age=Contra_Retirement_Age=Pro_Gender=Pro_Liberal;  
 
 

reg  survey_bias_weighted Pro_Integration  Pro_Immigration Contra_Immigration Contra_Military   
Pro_Environment Contra_Nuclear  Budget_Balance  Direct_Democracy  Pro_Health_Liberal Contra_Health_Liberal  Pro_Redistribution Pro_Retirement_Age  Contra_Retirement_Age  Pro_Gender  Pro_Liberal 
   if policyarea==1, noconstant cluster(datum_id);

outreg2 using "$results\tab3.xls", se append;


test Pro_Integration=Pro_Immigration=Contra_Immigration=Contra_Military =Pro_Environment=Contra_Nuclear=Budget_Balance=Direct_Democracy=Pro_Health_Liberal=Contra_Health_Liberal=Pro_Redistribution=Pro_Retirement_Age=Contra_Retirement_Age=Pro_Gender=Pro_Liberal; 


 
reg survey_bias_weighted_left   Pro_Integration  Pro_Immigration Contra_Immigration Contra_Military   
Pro_Environment Contra_Nuclear  Budget_Balance  Direct_Democracy  Pro_Health_Liberal Contra_Health_Liberal  Pro_Redistribution Pro_Retirement_Age  Contra_Retirement_Age Pro_Gender Pro_Liberal 
if policyarea==1, noconstant cluster(datum_id); 
 
outreg2 using "$results\tab3.xls", se append;


test Pro_Integration=Pro_Immigration=Contra_Immigration=Contra_Military =Pro_Environment=Contra_Nuclear=Budget_Balance=Direct_Democracy=Pro_Health_Liberal=Contra_Health_Liberal=Pro_Redistribution=Pro_Retirement_Age=Contra_Retirement_Age=Pro_Gender=Pro_Liberal; 
 
 
***control for share yes;

reg  survey_bias yes_official, cluster(datum_id);
predict resid, residuals;


reg  resid   Pro_Integration  Pro_Immigration Contra_Immigration Contra_Military   
Pro_Environment Contra_Nuclear  Budget_Balance  Direct_Democracy  Pro_Health_Liberal Contra_Health_Liberal  Pro_Redistribution Pro_Retirement_Age  Contra_Retirement_Age Pro_Gender Pro_Liberal 
  if policyarea==1, noconstant  cluster(datum_id)
;  

outreg2 using "$results\tab3.xls", se append;


test Pro_Integration=Pro_Immigration=Contra_Immigration=Contra_Military =Pro_Environment=Contra_Nuclear=Budget_Balance=Direct_Democracy=Pro_Health_Liberal=Contra_Health_Liberal=Pro_Redistribution=Pro_Retirement_Age=Contra_Retirement_Age=Pro_Gender=Pro_Liberal; 
  
restore
